<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <style>
        h1{background-color:blue;border-width: thick;}

        .GreenDiv{background-color:Green;}

        /** 更改每行的颜色**/

        /**table.tr{background-color:blue;}**/

        table tr:nth-child(odd){background: #ccc;}

        /*修改表格的样式*/

        table{width: 90%;background: #ccc;margin: 10px;border-collapse: collapse;}

        /**th,td{height: 25px;line-height: 25px;text-align: center;border: 1px solid #ccc;}**/

        th, td {height:25px;line-height:25px;text-align:center;border:1px solid #ccc;}

        th{background: #eee;font-weight: normal;}

        tr{background: #fff;}

        tr:hover{background: #cc0;}

        td a{color: #06f;text-decoration: none;}

        td a:hove{color: #06f;text-decoration: underline;}
    </style>
</head>
<body>
<div>
    <h2>交易结果</h2>
    <table>
        <thead>
            <td>序号</td>
            <td>交易流水</td>
            <td>商户订单号</td>
            <td>交易金额</td>
            <td>交易状态</td>
        </thead>
        <!--
            循环
            第1个参数: user 当前被循环的对象
            第2个参数:userStat 当前被循环的对象状态记录，例如:下标、第几条
            名字都随便取
        -->
        <tbody>
            <tr th:each="result,resultStat:${ReturnResult}">
                <td th:text="${resultStat.index}"></td>
                <td th:text="${result.trade_no}"></td>
                <td th:text="${result.out_trade_no}"></td>
                <td th:text="${result.total_amount}+'元'"></td>
                <td th:text="交易成功"></td>
            </tr>
        </tbody>

    </table>
</div>
</body>
</html>